package eureka.domain.auction;

import java.io.Serializable;
import java.sql.Timestamp;

import eureka.domain.account.WebsiteUser;
import net.sf.json.JSON;
import net.sf.json.JSONSerializer;

public class AuctionBidding implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private long babID;
	private Auction auction;
	private WebsiteUser bidder;
	private float price;
	private Timestamp biddingDate;
	

	public long getBabID() {
		return this.babID;
	}
	public void setBabID(long babID) {
		this.babID = babID;
	}

	public Auction getAuction() {
		return this.auction;
	}
	public void setAuction(Auction auction) {
		this.auction = auction;
	}

	public WebsiteUser getBidder() {
		return this.bidder;
	}
	public void setBidder(WebsiteUser bidder) {
		this.bidder = bidder;
	}

	public float getPrice() {
		return this.price;
	}
	public void setPrice(float price) {
		this.price = price;
	}

	public Timestamp getBiddingDate() {
		return this.biddingDate;
	}
	public void setBiddingDate(Timestamp biddingDate) {
		this.biddingDate = biddingDate;
	}
    
	public static AuctionBidding getDefaultEmpty() {
		AuctionBidding ab = new AuctionBidding();
		ab.babID = 0;
		ab.auction = Auction.getDefaultEmpty();
		ab.bidder = WebsiteUser.getDefaultEmpty();
		ab.price = 0;
		ab.biddingDate = null;
		return ab;
	}
	
    public JSON toJSON() {
    	return JSONSerializer.toJSON(this);
    }
}
